import { i18n } from "@/i18n";
import { ElNotification } from "element-plus";

const { t } = i18n.global;

export function NotificationSuccess(message: string) {
  ElNotification({
    title: t("message.commontInfo.success"),
    message: message,
    type: "success",
    duration: 1000
  });
}

export function NotificationError(message: string) {
  ElNotification({
    title: t("message.commontInfo.error"),
    message: message,
    type: "error",
    duration: 1000
  });
}

export function NotificationWarning(message: string) {
  ElNotification({
    title: t("message.commontInfo.warning"),
    message: message,
    type: "warning",
    duration: 1000
  });
}

export function NotificationInfo(message: string) {
  ElNotification({
    title: t("message.commontInfo.info"),
    message: message,
    type: "info",
    duration: 1000
  });
}
